<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
	String pageBeanUrl = request.getRequestURI() ; 
	pageBeanUrl = pageBeanUrl.substring(pageBeanUrl.indexOf("/",2)+1 , pageBeanUrl.length()) ; 
%>
<%@taglib prefix="pg" uri="http://jsptags.com/tags/navigation/pager"%>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
  
	<div class="pagination pagination-centered pagination-mini">
		<ul>
			<pg:pager url="${pageBean.url}" index="half-full"
				items="${pageBean.totalResult}" maxPageItems="${pageBean.pageSize}"
				export="currentPageNumber=pageNumber" scope="request">
				<c:if test="${!empty keyword}">
					<pg:param name="keyword" value="${keyword}"/>
				</c:if>
				<pg:first>
					<li>
						<a href="${pageUrl}">首页</a>
					</li>
				</pg:first>
				<pg:prev>
					<li>
						<a href="${pageUrl}">上一页 </a>
					</li>
				</pg:prev>
				<pg:pages>
					<c:choose>
						<c:when test="${pageNumber eq currentPageNumber }">
							<li class="active">
								<a href="${pageUrl}"><font color="red">${pageNumber
										}</font>
								</a>
							</li>
						</c:when>
						<c:otherwise>
							<li>
								<a href="${pageUrl}">${pageNumber}</a>
							</li>
						</c:otherwise>
					</c:choose>
				</pg:pages>
				<pg:next>
					<li>
						<a href="${pageUrl}">下一页</a>
					</li>
				</pg:next>
				<pg:last>
					<li>
						<a href="${pageUrl}">尾页</a>
					</li>
				</pg:last>

			</pg:pager>
		</ul>
	</div> 
